/**
 * By Alpha
 * Author: alixez <alixe.z@foxmail.com>
 * Date: 2017/11/3
 */

import { request, config } from 'utils';

const { api } = config;
const { user, department } = api;

/**
 * 查询所有的用户
 * @param {*} params 
 */
export async function queryUser (params) {
  return request({
    url: user.get,
    method: 'get',
    data: params,
  });
}

/**
 * 查询当前部门的所有用户
 * @param {*} params 
 */
export async function queryUsersByDept (params) {
  return request({
    url: user.getUsersByDept,
    method: 'get',
    data: params,
  });
}

/**
 * 查询当前工会所有的用户
 * @param {*} params 
 */
export async function queryAllUser (params) {
  return request({
    url: user.allUser,
    method: 'get',
    data: params,
  });
}


